﻿using System;
using System.Collections.Generic;

namespace ISEFun
{
    public class SEFileList : List<SEFileInfo>
    {
        public SEFileList()
        {
        }

        public void Add(string path)
        {
            this.Add(new SEFileInfo(path, SEType.New));
        }

        public void Add(string path, SEType type)
        {
            this.Add(new SEFileInfo(path, type));
        }

        public void Add(string sPath, string dPath, SEType type)
        {
            this.Add(new SEFileInfo(sPath, dPath, type));
        }

        public void Remove(string Path)
        {
            foreach (SEFileInfo item in this)
            {
                if (item.SourcePath == Path | item.DestinationPath == Path)
                {
                    this.Remove(item);
                }
            }
        }

        public void Remove(string sPath, string dPath)
        {
            foreach (SEFileInfo item in this)
            {
                if (item.SourcePath == sPath & item.DestinationPath == dPath)
                {
                    this.Remove(item);
                }
            }
        }

        public void Remove(SEType type)
        {
            foreach (SEFileInfo item in this)
            {
                if (item.Type == type)
                {
                    this.Remove(item);
                }
            }
        }
    }
}

